package com.oujia.cloud.cloudcommon.bean.xinge;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.oujia.cloud.cloudcommon.validator.group.AddGroup;
import com.oujia.cloud.cloudcommon.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

@ApiModel(value = "MsgInfoDTO", description = "消息体")
@Data
public class MsgInfoDTO {

    @ApiModelProperty(value = "消息类型（1.消息中心 2.弹窗，3.push 4.短信推送）", required = true)
    @NotNull(message = "消息内容不能为空", groups = {AddGroup.class})
    private Integer msgType;

    @ApiModelProperty(value = "消息标题", required = true)
    @NotNull(message = "消息标题不能为空", groups = {AddGroup.class})
    private String title;


    @ApiModelProperty(value = "消息内容", required = true)
    @NotNull(message = "消息内容不能为空", groups = {AddGroup.class})
    private String content;

    //如果是file 这里为MultipartFile 可以调用AliyunOssUtils.uploadObjectInput 拼接获取图片地址
    @ApiModelProperty(value = "消息图片地址")
    private String msgPic;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "推送开始时间(格式yyyy-MM-dd HH:mm:ss)")
    private Date pushStartTime;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "推送结束时间(格式yyyy-MM-dd HH:mm:ss)")
    private Date pushEndTime;

    @ApiModelProperty(value = "模板跳转地址")
    private String templateUrl;

    @ApiModelProperty(value = "推送版本")
    private String tagVersion;

    @ApiModelProperty(value = "活动弹窗类型 显示样式（1.图片，2.图片加文字）")
    private Integer activityPushType;

    @ApiModelProperty(value = "消息Id")
    @NotNull(message = "消息Id不能为空", groups = {UpdateGroup.class})
    private Long msgId;

    @ApiModelProperty(value = "显示样式（1.活动大图样式，2.缺书登记样式）")
    private Integer showType;

    @ApiModelProperty(value = "协议版本（不同的协议版本消息解析方式可能不同 现在默认为v1版本）")
    private String protocol;

    @ApiModelProperty(value = "详情id(绘本id,活动id..)")
    private Integer id;

    @ApiModelProperty(value = "跳转类型（1.外部链接，2.内部链接）")
    private Integer jumpType;

    @ApiModelProperty(value = "内部模板（1.绘本 2.活动）")
    private Integer indoorType;

    @ApiModelProperty(value = "账号名称")
    private String account;
}
